package net.sky.oa.service.system.impl;

import java.util.List;

import javax.annotation.Resource;

import net.sky.oa.dao.system.SysPostDao;
import net.sky.oa.model.SysPost;
import net.sky.oa.service.system.SysPostService;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.htsoft.core.service.impl.BaseServiceImpl;

@Service
@Transactional
public class SysPostServiceImpl extends BaseServiceImpl<SysPost> implements SysPostService {
	
	private SysPostDao dao;

	public SysPostServiceImpl() {}
	
	public SysPostServiceImpl(SysPostDao dao) {
		super(dao);
		this.dao = dao;
	}

	public List<SysPost> findAllPost() {
		return this.dao.findAllPost();
	}

	@Resource
	public void setDao(SysPostDao dao) {
		super.setDao(dao);
		this.dao = dao;
	}
	
	public List<SysPost> comboPost(String deptId)
	{
		return this.dao.comboPost(deptId);
	}
	
	@Transactional(readOnly = true)
	public List<SysPost> findByName(String name) {
		return this.dao.findByName(name);
	}
}